function [ status ] = mx_eyelink_wait_for_data( msec, sample, events )
%MX_EYELINK_WAIT_FOR_DATA Waits for data to be received from the eye tracker.
% Can wait for an event, a sample, or either. Typically used after record start 
% to check if data is being sent.
%
% Parameters:
% maxwait 	Time in milliseconds to wait for data.
% samples 	If 1, return when first sample available.
% events 	If 1, return when first event available.
% Returns:
% 1 if data is available. 0 if timed out.
%
%----------------------------------------------------------------------------
% Copyright Eduardo Aponte 2013
% aponteeduardo@gmail.com